From: Florian Müllner Date: Thu, 28 Jul 2011 14:59:10 +0000 (+0200) Subject: popup-menu: Expand switch menu items X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7854 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=709193d68004fce3fe57d35694818d5a6c857d88;p=gnome-shell.git popup-menu: Expand switch menu items Given that our menus contain at most two columns, all switch widgets in menus end up in the last columns, and thus aligned with the right menu edge. However, the updated user status menu will contain a section which ignores the menu's column layout, so the switch might end up in the middle of the menu if the overall width is determined by said section. At least for now, we always want the switch to align with the end, so just expand switch menu items rather than adding an option. https://bugzilla.gnome.org/show_bug.cgi?id=652837 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 07264f3db..c272de723 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -717,7 +717,8 @@ PopupSwitchMenuItem.prototype = { this.addActor(this.label); this._statusBin = new St.Bin({ x_align: St.Align.END }); - this.addActor(this._statusBin, { align: St.Align.END }); + this.addActor(this._statusBin, + { expand: true, span: -1, align: St.Align.END }); this._statusLabel = new St.Label({ text: '', style_class: 'popup-inactive-menu-item'